import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(urlPatterns = "/Servlet")
public class Servlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        PrintWriter out= response.getWriter();

        out.println("From Servlet!");

    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        String isdn =request.getParameter("ISDN");
        String name =request.getParameter("Name");
        String author =request.getParameter("Author");
        float price = Float.parseFloat(request.getParameter("Price"));
        PrintWriter out= response.getWriter();

        out.println(isdn);
        out.println(name);
        out.println(author);
        out.println(price);



    }
}
